aboutsummaryrefslogtreecommitdiff
path: root/src/pages/board/[board]
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/board/[board]')
-rw-r--r--src/pages/board/[board]/[tid].astro28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/pages/board/[board]/[tid].astro b/src/pages/board/[board]/[tid].astro
index 4aa34ef..e9b345a 100644
--- a/src/pages/board/[board]/[tid].astro
+++ b/src/pages/board/[board]/[tid].astro
@@ -1,14 +1,16 @@
---
-import Default from '../../../layouts/Default.astro';
-import Thread from '../../../components/Thread.svelte'
-import '../../../styles/thread.css'
-import type Thread from '../../../models/Thread';
+import '../../../styles/thread.css';
+import '../../../styles/blackbox.css';
+
+import ThreadLayout from '../../../layouts/ThreadLayout.astro';
+import Thread from '../../../components/Thread.astro'
+import type Thread from '../../../models/Thread';;
import { api } from '../../../lib/api';
import { processThreadIn } from '../../../lib/thread';
-const { board } = Astro.params;
-const data = await api('get', `thread/${board}/${Astro.params.tid}`);
+const { board, tid } = Astro.params;
+const data = await api('get', `thread/${board}/${tid}`);
if(data.status === 404) return Astro.redirect('/404');
@@ -16,6 +18,16 @@ const thread: Thread = await data.json();
await processThreadIn(board, thread, true);
---
-<Default>
+<ThreadLayout>
+ <h1 style="text-align:center">
+ <a href=`/board/${board}`>{board}</a>
+ </h1>
+
+ <div class="blackbox">
+ <button style="left: 50%; position: relative; transform: translate(-50%, 0);" onclick=`window.open('/create/${board}/${tid}','popUpWindow','height=500,width=600')`>
+ Create Comment
+ </button>
+ </div>
+
<Thread thread={thread} board={board} comments=true />
-</Default> \ No newline at end of file
+</ThreadLayout> \ No newline at end of file